package com.webwork.mood.record.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.google.gson.Gson;
import com.webwork.mood.common.controller.SuperCtrl;
import com.webwork.mood.record.service.MoodService;
import com.webwork.mood.system.service.UserService;

@Controller
@RequestMapping(value = "/record")
public class DrawController extends SuperCtrl {

	@Autowired
	private UserService userSve;
	
	@Autowired
	private MoodService moodSve;
	
	@RequestMapping(value = "/luckyDraw")
	@Override
	public String mainPage() {
		return "luckyDraw";
	}
	
	@RequestMapping(value = "/getDraw")
	@ResponseBody
	public ResponseEntity<String> getDraw() {
		HttpHeaders responseHeaders = new HttpHeaders();
		responseHeaders.add("Content-Type", "text/html; charset=utf-8");
		String ret = "tester";
		
		
		return new ResponseEntity<String>(new Gson().toJson(ret).toString(), responseHeaders, HttpStatus.CREATED);
	}
	
	
}
